<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
            width: 300px;
            height: 300px;
            line-height: 30px;
            color: red;
            background-color: skyblue;
        }
    </style>
</head>
<body>
    <div>七里香</div>
    <script>
        // 需求；点击div 控制台输出 为了部落
        let div =document.querySelector('div');

        div.onclick=function(){
           
            if( this.innerHTML=='为了部落，今晚吃鸡'){
                 this.innerHTML='鸡你太美';
            }else if(this.innerHTML=='七里香'){
                this.innerHTML='为了部落，今晚吃鸡';
            }else if(this.innerHTML=='鸡你太美'){
                this.innerHTML='你家的鸡会打篮球了吗';
            }else if(this.innerHTML=='你家的鸡会打篮球了吗'){
                this.innerHTML='七里香';
            }
        }
        /* 
          绑定事件步骤：
              1.获取元素
              2.绑定函数，把具体的业务逻辑封装到函数体
        */
    </script>
</body>
</html>